package com.bl.weilan.dao.repository;

import com.bl.weilan.dao.model.CompanyTeamEntity;
import com.bl.weilan.dao.model.CompanyTradeEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by liangweikang on 19/7/20.
 */
public interface CompanyTradeRepository extends JpaRepository<CompanyTradeEntity, String> {

//    List<CompanyTradeEntity> findByTradeA(String tradeAId);

    List<CompanyTradeEntity> findByTradeB(String tradeBId);

    List<CompanyTradeEntity> findByTradeC(String tradeCId);

//    List<CompanyTradeEntity> findByTradeD(String tradeDId);

    List<CompanyTradeEntity> findByCompanyId(String companyId);

    Page<CompanyTradeEntity> findByTradeB(String tradeBId, Pageable pageable);

    Page<CompanyTradeEntity> findByTradeC(String tradeCId, Pageable pageable);

//    Page<CompanyTradeEntity> findByTradeD(String tradeDId, Pageable pageable);

    void deleteByCompanyId(String companyId);
}
